package com.yanghui.lingyue.utils.databaseUtils

import com.yanghui.lingyue.bot.Bot
import com.yanghui.lingyue.data.Group
import java.sql.SQLException
import java.util.*

object GroupDatabaseUtils {

    fun getGroupList(): LinkedList<Group> {
        return Bot.sikaCore.databaseCopy()
    }

    @Throws(SQLException::class)
    fun setGroupName(group: Group) {
        Bot.sikaCore.databaseUpdate(group)
    }

    @Throws(SQLException::class)
    fun setGroupName(id: Long, name: String) {
        setGroupName(Group(id, name))
    }


}